<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the type of a variant object</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.variant-fix.html">« variant_fix</a></li>
      <li style="float: right;"><a href="function.variant-idiv.html">variant_idiv »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.com.html">COM 函数</a></li>
    <li>Returns the type of a variant object</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.variant-get-type" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">variant_get_type</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">variant_get_type</span> &mdash; <span class="dc-title">Returns the type of a variant object</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.variant-get-type-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>variant_get_type</strong></span>(<span class="methodparam"><span class="type"><a href="class.variant.html" class="type variant">variant</a></span> <code class="parameter">$variant</code></span>): <span class="type">int</span></div>

  <p class="para rdfs-comment">
   Returns the type of a variant object.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.variant-get-type-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">variant</code></dt>

     <dd>

      <p class="para">
       The variant object.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.variant-get-type-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   This function returns an integer value that indicates the type of
   <code class="parameter">variant</code>, which can be an instance of
   <a href="class.com.html" class="xref">com</a>, <a href="class.dotnet.html" class="xref">dotnet</a> or
   <a href="class.variant.html" class="xref">variant</a> classes.  The return value can be compared
   to one of the <strong><code>VT_XXX</code></strong> constants.
  </p>
  <p class="para">
   The return value for COM and DOTNET objects will usually be
   <strong><code>VT_DISPATCH</code></strong>; the only reason this function works for
   those classes is because COM and DOTNET are descendants of VARIANT.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.variant-get-type-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.variant-set-type.html" class="function" rel="rdfs-seeAlso">variant_set_type()</a> - Convert a variant into another type &quot;in-place&quot;</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>